package com.jky.filesystem;

import com.jky.filesystem.slice.RemoteAbilitySlice;
import com.jky.filesystem.utils.PermissionsUtils;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.ability.IAbilityContinuation;
import ohos.aafwk.content.Intent;
import ohos.aafwk.content.IntentParams;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;

public class RemoteAbility extends Ability implements IAbilityContinuation {
    private static final HiLogLabel LABEL_LOG = new HiLogLabel(3, 0xD000F00, "测试MAIN");
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setMainRoute(RemoteAbilitySlice.class.getName());
        PermissionsUtils.requestAllPermission(this);
    }

    @Override
    public boolean onStartContinuation() {
        HiLog.info(LABEL_LOG,"开始迁移");
        return true;
    }

    @Override
    public boolean onSaveData(IntentParams intentParams) {
        HiLog.info(LABEL_LOG,"开始保存数据");
        return true;
    }

    @Override
    public boolean onRestoreData(IntentParams intentParams) {
        HiLog.info(LABEL_LOG,"onRestoreData");
        return true;
    }

    @Override
    public void onCompleteContinuation(int i) {
        HiLog.info(LABEL_LOG,"迁移完成");
    }
}
